home *** CD-ROM | disk | FTP | other *** search
- unit Server_Stub;
-
- interface
-
- uses
- CorbaObj, OrbPas;
-
- type
- ITest = interface
- ['{1E4B84EE-D627-11D2-96EC-0060978E1359}']
- function Get_DateAndTime: TDateTime;
- property DateAndTime: TDateTime read Get_DateAndTime;
- end;
-
- TTestStub = class(TCorbaStub, ITest)
- function Get_DateAndTime: TDateTime;
- end;
-
- TTestCorbaFactory = class
- class function CreateInstance(const InstanceName: String): ITest;
- end;
-
- implementation
-
- function TTestStub.Get_DateAndTime: TDateTime;
- var
- OutBuf: IMarshalOutBuffer;
- InBuf: IMarshalInBuffer;
- begin;
- FStub.CreateRequest('Get_DateAndTime', True, OutBuf);
- FStub.Invoke(OutBuf, InBuf);
- Result := InBuf.GetDouble;
- end;
-
- class function TTestCorbaFactory.CreateInstance(const InstanceName: String): ITest;
- begin
- Result := CorbaFactoryCreateStub('IDL:Server/TestFactory:1.0', 'Test', InstanceName, '', ITest) as ITest
- end;
-
- initialization
- CorbaStubManager.RegisterStub(ITest, TTestStub);
- end.
-